﻿using System.Windows;
using System.Windows.Input;

namespace OpenDynDnsChanger.AdminApp
{
    /// <summary>
    /// Interaktionslogik für MainWindow.xaml
    /// </summary>
    public partial class MainWindow : Window
    {
        public MainWindow()
        {
            InitializeComponent();
        }

        private void Window_Loaded(object sender, RoutedEventArgs e)
        {
            //Load KeyBindings

            ViewModel.MainViewModel vm = (ViewModel.MainViewModel)DataContext;

            this.InputBindings.Add(
                new KeyBinding(vm.ExitCommand, Key.Escape, ModifierKeys.None));



        }

        private void pb_CredentialPW_Loaded(object sender, RoutedEventArgs e)
        {
            pb_CredentialPW.Password = new OpenDynDnsChanger.Cryption.CryptionHelper().Password;
        }
    }
}
